package enum01;
/**
 * 模拟枚举
 *  一周: 星期一~星期日
 */
public class Week {
    /**
     * 私有化构造的目的:只能使用Week类中的七个对象
     * 而不能在类外在创建本类对象
     */
    private Week(){

    }

    /*周一~周日每个均代表Week类的一个具体体现*/
    /**
     * public:保证权限足够大,能够在类外及不同包中直接访问Week类中的属性
     * static:由于构造方法已经私有化,无法通过创建本类对象来访问相关属性,只能通过类名.属性来访问
     * final:防止在类外修改Week类中的属性值,final修饰的引用变量恒指向该对象
     * 我们针对常量习惯上命名为纯大写:XXX_XXX_XXX
     */

    public static final Week MONDAY = new Week();
    public static final Week TUESDAY = new Week();
    public static final Week WEDNESDAY= new Week();
    public static final Week THURSDAY = new Week();
    public static final Week FRIDAY = new Week();
    public static final Week SATURDAY = new Week();
    public static final Week SUNDAY = new Week();

}
